package com.neusoft.databus.agent.pool.serial;

import org.apache.commons.pool2.KeyedPooledObjectFactory;
import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig;
import org.springframework.stereotype.Component;

import com.neusoft.databus.common.connection.SerialConnection;
import com.neusoft.databus.common.pool.AbstractPool;

import gnu.io.SerialPort;

/**
 * Serial串口连接池
 *
 * @author naxiang
 */
@Component
public class SerialPool extends AbstractPool<SerialConnection, SerialPort> {

    @Override
    public String getName() {
        return "SERIAL连接池";
    }

    @SuppressWarnings("rawtypes")
    public SerialPool(KeyedPooledObjectFactory<SerialConnection, SerialPort> factory,
            GenericKeyedObjectPoolConfig serialPoolConfig) {
        super(factory, serialPoolConfig);
    }

}
